#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    void reOrderArray(vector<int>& array) {
        int left = 0, right = array.size() - 1;
        while (left < right)
        {
            if (array[left] % 2) left++;
            if (array[right] % 2 == 0) right--;
            if (left < right)
                swap(array[left], array[right]);
        }
    }
};
